const state = {
  menuName: '',
}

const actions = {
  // 假设点击上面的菜单之后，传一个index下标(如果是id，可以用循环处理)
  setMenu (state, args) {
    state.commit('setMenu', args)
  }
}

const mutations = {
  setMenu (state, args) {
    state.menuName = args
  }
}

const menu = {
  state,
  actions,
  mutations,
}
export default menu
